<nav id="tree-breadcrumb" class="breadcrumb" aria-label="breadcrumbs">
  <ul>
    <li>
      <a href="<%= Routes.codebase_path(@conn, @breadcrumb.action, @repo.owner_login, @repo, @revision, []) %>"><%= @repo.name %></a>
    </li>
    <%= unless Enum.empty?(@tree_path) do %>
      <%= for {path, index} <- Enum.with_index(Enum.drop(@tree_path, -1), 1) do %>
        <li>
          <a href="<%= Routes.codebase_path(@conn, @breadcrumb.action, @repo.owner_login, @repo, @revision, Enum.take(@tree_path, index)) %>"><%= path %></a>
        </li>
      <% end %>
      <%= if @breadcrumb.cwd? do %>
        <li class="is-active">
          <a href="#"><%= List.last(@tree_path) %></a>
        </li>
      <% end %>
    <% end %>
    <%= if @breadcrumb.tree? do %>
      <li></li>
    <% end %>
  </ul>
</nav>
